package global

import (
	"MoSkeleton/framework"
	"MoSkeleton/framework/core"
	base2 "MoSkeleton/models/base"
	"MoSkeleton/services/base"
	"MoSkeleton/web/routers/external_type"
)

type ConfigEvent struct {
}

func (c *ConfigEvent) OnInitSystem() error {
	framework.InitContainerInst.Register(core.InitSys_Order+100, &base2.InitModels{})
	framework.InitContainerInst.Register(core.InitSys_Order+101, &base.InitServices{})
	framework.InitContainerInst.Register(core.InitSys_Order+200, external_type.NewInitRouter(&framework.ConfigContainerInst.AppProperty.App.Gin))
	framework.InitContainerInst.Register(core.InitSys_Order+280, &CommonInitServices{})
	return nil
}

func (c *ConfigEvent) OnAfterInitSystem() error {
	return nil
}
